package com.ruoyi.supervise.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.supervise.mapper.ProsAccessoriesMapper;
import com.ruoyi.supervise.domain.ProsAccessories;
import com.ruoyi.supervise.service.IProsAccessoriesService;
import com.ruoyi.common.core.text.Convert;

/**
 * 附件Service业务层处理
 * 
 * @author ruoyi
 * @date 2019-10-12
 */
@Service
public class ProsAccessoriesServiceImpl implements IProsAccessoriesService 
{
    @Autowired
    private ProsAccessoriesMapper prosAccessoriesMapper;

    /**
     * 查询附件
     * 
     * @param guid 附件ID
     * @return 附件
     */
    @Override
    public ProsAccessories selectProsAccessoriesById(String guid)
    {
        return prosAccessoriesMapper.selectProsAccessoriesById(guid);
    }

    /**
     * 查询附件列表
     * 
     * @param prosAccessories 附件
     * @return 附件
     */
    @Override
    public List<ProsAccessories> selectProsAccessoriesList(ProsAccessories prosAccessories)
    {
        return prosAccessoriesMapper.selectProsAccessoriesList(prosAccessories);
    }

    /**
     * 新增附件
     * 
     * @param prosAccessories 附件
     * @return 结果
     */
    @Override
    public int insertProsAccessories(ProsAccessories prosAccessories)
    {
        return prosAccessoriesMapper.insertProsAccessories(prosAccessories);
    }

    /**
     * 修改附件
     * 
     * @param prosAccessories 附件
     * @return 结果
     */
    @Override
    public int updateProsAccessories(ProsAccessories prosAccessories)
    {
        return prosAccessoriesMapper.updateProsAccessories(prosAccessories);
    }

    /**
     * 删除附件对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteProsAccessoriesByIds(String ids)
    {
        return prosAccessoriesMapper.deleteProsAccessoriesByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除附件信息
     * 
     * @param guid 附件ID
     * @return 结果
     */
    public int deleteProsAccessoriesById(String guid)
    {
        return prosAccessoriesMapper.deleteProsAccessoriesById(guid);
    }
}
